//
//  pictureView.m
//  QRMaster
//
//  Created by myApple on 15/10/8.
//  Copyright (c) 2015年 myApple. All rights reserved.
//

#import "pictureView.h"

@interface pictureView()
{
    UIColor * contentBackColor;
}

@end

@implementation pictureView

/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

-(instancetype)initWithCoder:(NSCoder *)aDecoder
{
    self = [super initWithCoder:aDecoder];
    if (self) {
        contentBackColor = [[UIColor blackColor]colorWithAlphaComponent:0.5];
    }
    return self;
}



-(void)drawRect:(CGRect)rect
{
    CGContextRef context = UIGraphicsGetCurrentContext();
    if (context == nil) {
        return;
    }
    [contentBackColor setFill];
    UIRectFill(rect);
    
    CGRect circleRect = rect;
    CGContextSetFillColorWithColor(context, [UIColor clearColor].CGColor);
    CGContextSetBlendMode(context, kCGBlendModeClear);
    CGContextFillEllipseInRect(context, circleRect);
}

-(void)getCircleView
{
    [self setNeedsDisplay];
}

@end
